package com.haiyou.dc.thread.test4;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo5 {

    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(10);
        for (int i = 0; i < 10; i++) {
            pool.execute(() -> {
                System.out.println(Thread.currentThread().getName());
            });
        }
        pool.shutdown();
    }
}
